<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>日常操作场景 | whoway</title>
    <meta name="description" content="Personal Blog Website">
    <link rel="icon" href="/images/photo.jpg">
  <link rel="manifest" href="/images/photo.jpg">
  <link rel="apple-touch-icon" href="/images/photo.jpg">
  <meta http-quiv="pragma" cotent="no-cache">
  <meta http-quiv="pragma" cotent="no-cache,must-revalidate">
  <meta http-quiv="expires" cotent="0">
    
    <link rel="preload" href="/assets/css/0.styles.0dbae9ec.css" as="style"><link rel="preload" href="/assets/js/app.c70e21ad.js" as="script"><link rel="preload" href="/assets/js/150.406c4b20.js" as="script"><link rel="prefetch" href="/assets/js/10.15222a53.js"><link rel="prefetch" href="/assets/js/100.7e0e5a86.js"><link rel="prefetch" href="/assets/js/101.efd59f25.js"><link rel="prefetch" href="/assets/js/102.dfbdc06c.js"><link rel="prefetch" href="/assets/js/103.d3ab2109.js"><link rel="prefetch" href="/assets/js/104.117957ef.js"><link rel="prefetch" href="/assets/js/105.046e8ff3.js"><link rel="prefetch" href="/assets/js/106.aebdc17d.js"><link rel="prefetch" href="/assets/js/107.248733c2.js"><link rel="prefetch" href="/assets/js/108.a2fecadc.js"><link rel="prefetch" href="/assets/js/109.35196857.js"><link rel="prefetch" href="/assets/js/11.770642f2.js"><link rel="prefetch" href="/assets/js/110.cf3d973c.js"><link rel="prefetch" href="/assets/js/111.f985889a.js"><link rel="prefetch" href="/assets/js/112.ad614f41.js"><link rel="prefetch" href="/assets/js/113.f666653c.js"><link rel="prefetch" href="/assets/js/114.c6c3f384.js"><link rel="prefetch" href="/assets/js/115.e51d3c2f.js"><link rel="prefetch" href="/assets/js/116.4f4b39f5.js"><link rel="prefetch" href="/assets/js/117.99352e11.js"><link rel="prefetch" href="/assets/js/118.c6ae6572.js"><link rel="prefetch" href="/assets/js/119.4ccbe778.js"><link rel="prefetch" href="/assets/js/12.042a92ff.js"><link rel="prefetch" href="/assets/js/120.edda1c4f.js"><link rel="prefetch" href="/assets/js/121.30a638ed.js"><link rel="prefetch" href="/assets/js/122.6efcefb1.js"><link rel="prefetch" href="/assets/js/123.91e6665b.js"><link rel="prefetch" href="/assets/js/124.f27e3d7e.js"><link rel="prefetch" href="/assets/js/125.c75712d5.js"><link rel="prefetch" href="/assets/js/126.ed756cce.js"><link rel="prefetch" href="/assets/js/127.2f06c74c.js"><link rel="prefetch" href="/assets/js/128.d5f6f30e.js"><link rel="prefetch" href="/assets/js/129.508b7eed.js"><link rel="prefetch" href="/assets/js/13.b5280c37.js"><link rel="prefetch" href="/assets/js/130.dc05f9aa.js"><link rel="prefetch" href="/assets/js/131.e0ba69b1.js"><link rel="prefetch" href="/assets/js/132.d79bcaa4.js"><link rel="prefetch" href="/assets/js/133.34acc01a.js"><link rel="prefetch" href="/assets/js/134.dabf64d5.js"><link rel="prefetch" href="/assets/js/135.ad90c915.js"><link rel="prefetch" href="/assets/js/136.dbb0074f.js"><link rel="prefetch" href="/assets/js/137.284ad365.js"><link rel="prefetch" href="/assets/js/138.a4b6856f.js"><link rel="prefetch" href="/assets/js/139.c9c1e20f.js"><link rel="prefetch" href="/assets/js/14.df02ba38.js"><link rel="prefetch" href="/assets/js/140.8b0a9269.js"><link rel="prefetch" href="/assets/js/141.9c7759c5.js"><link rel="prefetch" href="/assets/js/142.a4201a82.js"><link rel="prefetch" href="/assets/js/143.d7da6e8c.js"><link rel="prefetch" href="/assets/js/144.5e48e65d.js"><link rel="prefetch" href="/assets/js/145.a0e2633c.js"><link rel="prefetch" href="/assets/js/146.3c775f9b.js"><link rel="prefetch" href="/assets/js/147.22add89a.js"><link rel="prefetch" href="/assets/js/148.cfde1009.js"><link rel="prefetch" href="/assets/js/149.ffc835b5.js"><link rel="prefetch" href="/assets/js/15.fbdfc4ee.js"><link rel="prefetch" href="/assets/js/151.b2040eea.js"><link rel="prefetch" href="/assets/js/152.7bc65661.js"><link rel="prefetch" href="/assets/js/153.1d7c65e3.js"><link rel="prefetch" href="/assets/js/154.1309de49.js"><link rel="prefetch" href="/assets/js/155.81d3ee1f.js"><link rel="prefetch" href="/assets/js/156.154a4ef2.js"><link rel="prefetch" href="/assets/js/16.e5eb6147.js"><link rel="prefetch" href="/assets/js/17.57853c4a.js"><link rel="prefetch" href="/assets/js/18.cb9d7518.js"><link rel="prefetch" href="/assets/js/19.f354dc47.js"><link rel="prefetch" href="/assets/js/2.570d8a23.js"><link rel="prefetch" href="/assets/js/20.b5af7fad.js"><link rel="prefetch" href="/assets/js/21.0b1928fe.js"><link rel="prefetch" href="/assets/js/22.f78666de.js"><link rel="prefetch" href="/assets/js/23.29c3f366.js"><link rel="prefetch" href="/assets/js/24.6f596516.js"><link rel="prefetch" href="/assets/js/25.14067b60.js"><link rel="prefetch" href="/assets/js/26.74ba4989.js"><link rel="prefetch" href="/assets/js/27.13d60edd.js"><link rel="prefetch" href="/assets/js/28.9523cb32.js"><link rel="prefetch" href="/assets/js/29.8ec842e9.js"><link rel="prefetch" href="/assets/js/3.3fb3d2e0.js"><link rel="prefetch" href="/assets/js/30.805597a8.js"><link rel="prefetch" href="/assets/js/31.831b195d.js"><link rel="prefetch" href="/assets/js/32.063c672d.js"><link rel="prefetch" href="/assets/js/33.6d93fac3.js"><link rel="prefetch" href="/assets/js/34.56e8263c.js"><link rel="prefetch" href="/assets/js/35.dbe688bb.js"><link rel="prefetch" href="/assets/js/36.dc5af2c1.js"><link rel="prefetch" href="/assets/js/37.0a7494f6.js"><link rel="prefetch" href="/assets/js/38.fe4fc171.js"><link rel="prefetch" href="/assets/js/39.f5ed5e92.js"><link rel="prefetch" href="/assets/js/4.2c405ec8.js"><link rel="prefetch" href="/assets/js/40.fe7e2714.js"><link rel="prefetch" href="/assets/js/41.30b0811d.js"><link rel="prefetch" href="/assets/js/42.76f52d62.js"><link rel="prefetch" href="/assets/js/43.e7bb0817.js"><link rel="prefetch" href="/assets/js/44.ead0e883.js"><link rel="prefetch" href="/assets/js/45.235df046.js"><link rel="prefetch" href="/assets/js/46.5f09e829.js"><link rel="prefetch" href="/assets/js/47.67116354.js"><link rel="prefetch" href="/assets/js/48.31f34543.js"><link rel="prefetch" href="/assets/js/49.10b5ebba.js"><link rel="prefetch" href="/assets/js/5.6f47322c.js"><link rel="prefetch" href="/assets/js/50.c0f0b7f1.js"><link rel="prefetch" href="/assets/js/51.5143f3bf.js"><link rel="prefetch" href="/assets/js/52.eeddfd48.js"><link rel="prefetch" href="/assets/js/53.eb790db5.js"><link rel="prefetch" href="/assets/js/54.8fe5421c.js"><link rel="prefetch" href="/assets/js/55.d8f9004b.js"><link rel="prefetch" href="/assets/js/56.62ac9b92.js"><link rel="prefetch" href="/assets/js/57.a9caec0d.js"><link rel="prefetch" href="/assets/js/58.f93fc522.js"><link rel="prefetch" href="/assets/js/59.a81a03aa.js"><link rel="prefetch" href="/assets/js/6.8c2ea393.js"><link rel="prefetch" href="/assets/js/60.ab782775.js"><link rel="prefetch" href="/assets/js/61.6dd12daf.js"><link rel="prefetch" href="/assets/js/62.76f4b01f.js"><link rel="prefetch" href="/assets/js/63.6f8a4742.js"><link rel="prefetch" href="/assets/js/64.6f8bb1fa.js"><link rel="prefetch" href="/assets/js/65.4120a44b.js"><link rel="prefetch" href="/assets/js/66.360c2d2b.js"><link rel="prefetch" href="/assets/js/67.26f84d32.js"><link rel="prefetch" href="/assets/js/68.68f45e5e.js"><link rel="prefetch" href="/assets/js/69.e311eb56.js"><link rel="prefetch" href="/assets/js/7.6762b2d7.js"><link rel="prefetch" href="/assets/js/70.cea82674.js"><link rel="prefetch" href="/assets/js/71.783ddcf7.js"><link rel="prefetch" href="/assets/js/72.e5467385.js"><link rel="prefetch" href="/assets/js/73.b8fb681b.js"><link rel="prefetch" href="/assets/js/74.1bae37db.js"><link rel="prefetch" href="/assets/js/75.024387e5.js"><link rel="prefetch" href="/assets/js/76.a8e53010.js"><link rel="prefetch" href="/assets/js/77.8c55500a.js"><link rel="prefetch" href="/assets/js/78.7ce90bf5.js"><link rel="prefetch" href="/assets/js/79.ef71713f.js"><link rel="prefetch" href="/assets/js/8.788a6364.js"><link rel="prefetch" href="/assets/js/80.acad589d.js"><link rel="prefetch" href="/assets/js/81.02670d10.js"><link rel="prefetch" href="/assets/js/82.53b7b1ac.js"><link rel="prefetch" href="/assets/js/83.99eb8581.js"><link rel="prefetch" href="/assets/js/84.d1535ce3.js"><link rel="prefetch" href="/assets/js/85.fe2b7de9.js"><link rel="prefetch" href="/assets/js/86.41850272.js"><link rel="prefetch" href="/assets/js/87.1cdc6df9.js"><link rel="prefetch" href="/assets/js/88.01bf3461.js"><link rel="prefetch" href="/assets/js/89.17c69819.js"><link rel="prefetch" href="/assets/js/9.3813842d.js"><link rel="prefetch" href="/assets/js/90.f6ae7e35.js"><link rel="prefetch" href="/assets/js/91.507bc284.js"><link rel="prefetch" href="/assets/js/92.90551782.js"><link rel="prefetch" href="/assets/js/93.dc442d78.js"><link rel="prefetch" href="/assets/js/94.315f4e94.js"><link rel="prefetch" href="/assets/js/95.ccd6c6bf.js"><link rel="prefetch" href="/assets/js/96.0c6d89d0.js"><link rel="prefetch" href="/assets/js/97.1a9f10a9.js"><link rel="prefetch" href="/assets/js/98.43be3caa.js"><link rel="prefetch" href="/assets/js/99.54c8207b.js">
    <link rel="stylesheet" href="/assets/css/0.styles.0dbae9ec.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">whoway</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link router-link-active">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🎓Coding</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/00.Coding/TheBeautyOfProgramming/" class="nav-link">🔖编程之美题解</a></li><li class="dropdown-item"><!----> <a href="/00.Coding/CodeWarehouse/" class="nav-link">🔖代码意识流</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">🚀语言</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/01.Language/Overview/" class="nav-link">🔖概述</a></li><li class="dropdown-item"><!----> <a href="/01.Language/C/" class="nav-link">⭐️C</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Cpp/" class="nav-link">🚀C++</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Java/" class="nav-link">☕️Java</a></li><li class="dropdown-item"><!----> <a href="/01.Language/Python/" class="nav-link">🧩Python3</a></li></ul></div></div><div class="nav-item"><a href="/02.Hardware/" class="nav-link">✔️硬件基础</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⭐️软件基础</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/03.Software/01.DataStructureAndAlgorithm/" class="nav-link">🐾数据结构和算法</a></li><li class="dropdown-item"><!----> <a href="/03.Software/02.OS/" class="nav-link">💻操作系统</a></li><li class="dropdown-item"><!----> <a href="/03.Software/03.Net/" class="nav-link">☁️计算机网络</a></li><li class="dropdown-item"><!----> <a href="/03.Software/04.SE/" class="nav-link">✅软件工程</a></li></ul></div></div><div class="nav-item"><a href="/04.Database/" class="nav-link">🎨数据库</a></div><div class="nav-item"><a href="/05.Engineer/" class="nav-link">🔖学术/工程</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">⚙️工具</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/06.Tools/01.employment/" class="nav-link">🔖求职</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/02.efficiency/" class="nav-link">🚀效能</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/03.windows/" class="nav-link">⚙️Windows</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/04.design/" class="nav-link">🧩设计</a></li><li class="dropdown-item"><!----> <a href="/06.Tools/05.linux/" class="nav-link router-link-active">🐉Linux</a></li></ul></div></div><div class="nav-item"><a href="https://github.com/whoway" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>日常操作场景</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_0-常用快捷键" class="sidebar-link">0.常用快捷键</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_1-目录记忆" class="sidebar-link">1.目录记忆</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_1-1-root和home" class="sidebar-link">1.1.root和home</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_1-2-opt" class="sidebar-link">1.2.opt</a></li></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_2-linux输出与输入" class="sidebar-link">2.Linux输出与输入</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_2-1-输出『echo』" class="sidebar-link">2.1.输出『echo』</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_2-2-输入『read』" class="sidebar-link">2.2.输入『read』</a></li></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_3-重定向与追加-和" class="sidebar-link">3.重定向与追加&gt;和&gt;&gt;</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_4-linux下各种man✅" class="sidebar-link">4.linux下各种man✅</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_4-1-『man-1" class="sidebar-link">4.1.『man  1</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_4-2-『man-5" class="sidebar-link">4.2.『man 5</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_4-3-man的经验" class="sidebar-link">4.3.man的经验</a></li><li class="sidebar-sub-header"><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_4-4-linux下开发c语言需要安装的manpages手册『核心』" class="sidebar-link">4.4.Linux下开发C语言需要安装的manpages手册『核心』</a></li></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_5-换源" class="sidebar-link">5.换源</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_6-『进程』查询✅" class="sidebar-link">6.『进程』查询✅</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/06.Tools/05.linux/Part04.%E6%97%A5%E5%B8%B8%E6%93%8D%E4%BD%9C%E5%9C%BA%E6%99%AF.html#_7-快速添加当前路径到path（临时）" class="sidebar-link">7.快速添加当前路径到PATH（临时）</a><ul class="sidebar-sub-headers"></ul></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><h1 id="日常操作场景"><a href="#日常操作场景" class="header-anchor">#</a> 日常操作场景</h1> <h2 id="_0-常用快捷键"><a href="#_0-常用快捷键" class="header-anchor">#</a> 0.常用快捷键</h2> <ul><li><code>ctrl+C</code>:发送SIGINT信号给前台进程组中的所有进程。常用于『==终止==』在运行的程序;</li> <li><code>ctrl+Z</code>:发送SIGTSTP信号给前台进程组中的『所有进程』，常用于『==挂起==』一个进程;</li> <li><code>ctrl+S</code>:中断控制台输出;</li> <li><code>ctrl+Q</code>:恢复控制台输出;</li> <li><code>ctrl+L</code>:清屏</li></ul> <div class="language-txt line-numbers-mode"><pre class="language-text"><code>ctri-d:不是发送信号，而是『表示一个特殊的二进制值，表示EOF，作用相当于在终端中输入exit后回车』;
ctri-\:发送 SIGQUIT信号给前台进程组中的所有进程，『终止前合进程并生成core文件』
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="_1-目录记忆"><a href="#_1-目录记忆" class="header-anchor">#</a> 1.目录记忆</h2> <h3 id="_1-1-root和home"><a href="#_1-1-root和home" class="header-anchor">#</a> 1.1.root和home</h3> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">cd</span> ~/
和
<span class="token builtin class-name">cd</span> /root/
等价，都是去root用户的『家』
类似于，去普通用户的『家』
<span class="token builtin class-name">cd</span> /home/hacv/

『家』是什么？？如果你的Linux装了图形化的话，那么家下面就会有『桌面』、『图片』啥的，比如我装在U盘中的系统
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><h3 id="_1-2-opt"><a href="#_1-2-opt" class="header-anchor">#</a> 1.2.opt</h3> <ul><li>一般我们装的软件，比如『Typeroa』这样的Markdown编辑器，一般放这个里面</li></ul> <h2 id="_2-linux输出与输入"><a href="#_2-linux输出与输入" class="header-anchor">#</a> 2.Linux输出与输入</h2> <ul><li>类似C语言中printf和scanf？</li></ul> <h3 id="_2-1-输出『echo』"><a href="#_2-1-输出『echo』" class="header-anchor">#</a> 2.1.输出『echo』</h3> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">echo</span> 输出
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_2-2-输入『read』"><a href="#_2-2-输入『read』" class="header-anchor">#</a> 2.2.输入『read』</h3> <p>Linux read命令用于从标准输入读取数值。</p> <p>read 内部命令被用来从标准输入读取单行数据。这个命令可以用来读取键盘输入，当使用重定向的时候，可以读取文件中的一行数据。</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token builtin class-name">echo</span> 输出成功
<span class="token builtin class-name">echo</span> 按任意键继续
<span class="token builtin class-name">read</span> -n <span class="token number">1</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><p>该例子使用了-n 选项，后接数值 1，指示 read 命令只要接受到一个字符就退出。</p> <p>只要按下一个字符进行回答，read 命令立即接受输入并将其传给变量，无需按回车键。</p> <p>联合使用</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token comment">#!bin/bash</span>

<span class="token builtin class-name">echo</span> 请输入字符串
<span class="token builtin class-name">read</span> str
<span class="token builtin class-name">echo</span> <span class="token variable">$str</span>

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><ul><li>1、<code>#</code>是注释的作用</li> <li>2、神奇命令<code>#!</code>仅此一条，并不是注释</li></ul> <h2 id="_3-重定向与追加-和"><a href="#_3-重定向与追加-和" class="header-anchor">#</a> 3.重定向与追加<code>&gt;</code>和<code>&gt;&gt;</code></h2> <ul><li>记忆方法：
<ul><li><code>&gt;</code>只有1个，那就是直接覆盖</li> <li><code>&gt;&gt;</code>有2个，那就是可以叠加在一个<code>&gt;</code>上面，显然就是追加</li></ul></li></ul> <h2 id="_4-linux下各种man✅"><a href="#_4-linux下各种man✅" class="header-anchor">#</a> 4.linux下各种man✅</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">man</span> <span class="token function">man</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>就可以查询到下面这些</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>帮助文件man：
    <span class="token function">man</span> <span class="token number">1</span>：用户命令（可执行命令和shell程序）  『man ls』或『man <span class="token number">1</span> ls』  『man passwd』  『man tar』
    <span class="token function">man</span> <span class="token number">2</span>：系统调用（从用户空间调用的内核例程）
    <span class="token function">man</span> <span class="token number">3</span>：库函数（有程序库提供）
    <span class="token function">man</span> <span class="token number">4</span>：特殊文件（如设备文件）
    <span class="token function">man</span> <span class="token number">5</span>：文件格式（用于许多配置文件和结构）	『man ext4 -5』或者『man <span class="token number">5</span> ext4』但是直接『man ext4』也OK
    <span class="token function">man</span> <span class="token number">6</span>：游戏（过去的有趣程序章节）
    <span class="token function">man</span> <span class="token number">7</span>：惯例、标准和其他（协议、文件系统）
    <span class="token function">man</span> <span class="token number">8</span>：系统管理和特权命令（维护任务）『man fdisk』或『man <span class="token number">8</span> fdisk』   『man <span class="token number">8</span> useradd』
    <span class="token function">man</span> <span class="token number">9</span>：Linux 内核API（内核调用）
    n 新文档， 可能要移到更适合的领域。

o 老文档， 可能会在一段期限内保留。

l 本地文档， 与本特定系统有关的。
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><h3 id="_4-1-『man-1"><a href="#_4-1-『man-1" class="header-anchor">#</a> 4.1.『<code>man 1</code></h3> <p>man 1：用户命令（可执行命令和shell程序）</p> <h3 id="_4-2-『man-5"><a href="#_4-2-『man-5" class="header-anchor">#</a> 4.2.『<code>man 5</code></h3> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">man</span> <span class="token number">5</span> ext4
<span class="token function">man</span> ext <span class="token number">5</span>
<span class="token function">man</span> ext -5
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><ul><li>注意：就是不能..</li> <li><code>man -5 ext4</code>，这是什么鬼？</li></ul> <h3 id="_4-3-man的经验"><a href="#_4-3-man的经验" class="header-anchor">#</a> 4.3.man的经验</h3> <p>大家都知道在Unix/Linux中有个man命令，可以查询常用的命令，函数。可是对于我们这样只知道用&quot;man 函数名&quot;来查询的人来说，会遇到很多问题，比如：</p> <ul><li>man read，我想看的是ANSI C中stdio的read函数原型和说明，没想到出来的确是BASH命令的说明，这是怎么回事呢？
<ul><li>原来read本身是man命令的一个参数，这样输入man就会以为你要使用read的功能，而不是查看read函数，那么要怎样查看read函数呢?</li> <li>要查属于哪一部分的，就用哪一部分的编号在命令之前。</li></ul></li></ul> <p>此外，在Ubuntu中是可以安装中文man的，不会的可以GOOGLE下</p> <ul><li><p>1.man 2 write</p> <p>man后加2表示：函数是系统函数。</p></li> <li><p>2.man 3 fopen</p> <p>man后加3表示：函数是C库函数。</p></li></ul> <h3 id="_4-4-linux下开发c语言需要安装的manpages手册『核心』"><a href="#_4-4-linux下开发c语言需要安装的manpages手册『核心』" class="header-anchor">#</a> 4.4.Linux下开发C语言需要安装的manpages手册『核心』</h3> <ul><li>因为笔者发现，在我买的『腾讯云』的cetos服务器上，我想<code>man fork</code>和<code>man scanf</code>都没有反应！</li> <li>比如，我man系统编程的<code>man 7 signal</code>也显示</li> <li><code>No manual entry for signal in section 7</code></li> <li>如果知道本电脑装上了哪些man pages呢？</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>这个简单 <span class="token function">man</span> 全部内容基本上都在这个目录（包括了目录）里。
<span class="token builtin class-name">cd</span> /usr/share/man
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>linux下开发C代码需要安装的manpages：</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> manpages
$ <span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> manpages-dev
$ <span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> manpages-posix
$ <span class="token function">sudo</span> <span class="token function">apt-get</span> <span class="token function">install</span> manpages-posix-dev

manpages 包含 GNU/Linux 的基本操作
manpages-dev 包含 GNU/Linux 的基本操作API
manpages-posix 包含 POSIX 所定义公用程序的方法
manpages-posix-dev 包含 POSIX 的 header files 和 library calls 的用法
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><h2 id="_5-换源"><a href="#_5-换源" class="header-anchor">#</a> 5.换源</h2> <ul><li><p>CentOS的和Kali 的对比</p></li> <li><p>都在文件夹<code>cd /etc/</code></p></li> <li><p>yum系列的在：<code>yum.repos.d/</code></p></li></ul> <p>可以搜索：<code>ls | grep &quot;yum&quot;</code></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>root@VM-0-14-centos etc<span class="token punctuation">]</span><span class="token comment"># cd yum</span>
yum/         yum.repos.d/ 
<span class="token punctuation">[</span>root@VM-0-14-centos etc<span class="token punctuation">]</span><span class="token comment"># cd yum</span>
yum/         yum.repos.d/ 
<span class="token punctuation">[</span>root@VM-0-14-centos etc<span class="token punctuation">]</span><span class="token comment"># pwd</span>
/etc
<span class="token punctuation">[</span>root@VM-0-14-centos etc<span class="token punctuation">]</span><span class="token comment"># cd yum.repos.d/</span>
<span class="token punctuation">[</span>root@VM-0-14-centos yum.repos.d<span class="token punctuation">]</span><span class="token comment"># ls</span>
CentOS-Base.repo  CentOS-Epel.repo
<span class="token punctuation">[</span>root@VM-0-14-centos yum.repos.d<span class="token punctuation">]</span><span class="token comment"># ls</span>
CentOS-Base.repo  CentOS-Epel.repo
<span class="token punctuation">[</span>root@VM-0-14-centos yum.repos.d<span class="token punctuation">]</span><span class="token comment"># cat CentOS-Base.repo </span>
<span class="token punctuation">[</span>extras<span class="token punctuation">]</span>
<span class="token assign-left variable">gpgcheck</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">gpgkey</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-7
<span class="token assign-left variable">enabled</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">baseurl</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/<span class="token variable">$releasever</span>/extras/<span class="token variable">$basearch</span>/
<span class="token assign-left variable">name</span><span class="token operator">=</span>Qcloud centos extras - <span class="token variable">$basearch</span>
<span class="token punctuation">[</span>os<span class="token punctuation">]</span>
<span class="token assign-left variable">gpgcheck</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">gpgkey</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-7
<span class="token assign-left variable">enabled</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">baseurl</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/<span class="token variable">$releasever</span>/os/<span class="token variable">$basearch</span>/
<span class="token assign-left variable">name</span><span class="token operator">=</span>Qcloud centos os - <span class="token variable">$basearch</span>
<span class="token punctuation">[</span>updates<span class="token punctuation">]</span>
<span class="token assign-left variable">gpgcheck</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">gpgkey</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/RPM-GPG-KEY-CentOS-7
<span class="token assign-left variable">enabled</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">baseurl</span><span class="token operator">=</span>http://mirrors.tencentyun.com/centos/<span class="token variable">$releasever</span>/updates/<span class="token variable">$basearch</span>/
<span class="token punctuation">[</span>root@VM-0-14-centos yum.repos.d<span class="token punctuation">]</span><span class="token comment"># cat CentOS-Epel.repo </span>
<span class="token punctuation">[</span>epel<span class="token punctuation">]</span>
<span class="token assign-left variable">name</span><span class="token operator">=</span>EPEL <span class="token keyword">for</span> redhat/centos <span class="token variable">$releasever</span> - <span class="token variable">$basearch</span>
<span class="token assign-left variable">failovermethod</span><span class="token operator">=</span>priority
<span class="token assign-left variable">gpgcheck</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">gpgkey</span><span class="token operator">=</span>http://mirrors.tencentyun.com/epel/RPM-GPG-KEY-EPEL-7
<span class="token assign-left variable">enabled</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">baseurl</span><span class="token operator">=</span>http://mirrors.tencentyun.com/epel/<span class="token variable">$releasever</span>/<span class="token variable">$basearch</span>/<span class="token punctuation">[</span>root@VM-0-14-centos yum.repos.d<span class="token punctuation">]</span><span class="token comment"># </span>

</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br></div></div><ul><li>apt系列在<code>cd apt</code></li> <li><code>vim source.list</code></li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/etc/apt<span class="token punctuation">]</span>
└─<span class="token comment"># ls</span>
apt.conf.d  auth.conf.d  listchanges.conf  listchanges.conf.d  preferences.d  sources.list  sources.list~  sources.list.d  trusted.gpg.d
                                                         
┌──<span class="token punctuation">(</span>root💀HACV<span class="token punctuation">)</span>-<span class="token punctuation">[</span>/etc/apt<span class="token punctuation">]</span>
└─<span class="token comment"># vim sources.list</span>
                                     
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h2 id="_6-『进程』查询✅"><a href="#_6-『进程』查询✅" class="header-anchor">#</a> 6.『进程』查询✅</h2> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">ps</span> aux <span class="token operator">|</span> <span class="token function">grep</span> <span class="token string">&quot;init&quot;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>也可以是</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token function">ps</span> aux <span class="token operator">|</span> <span class="token function">grep</span> init
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="_7-快速添加当前路径到path（临时）"><a href="#_7-快速添加当前路径到path（临时）" class="header-anchor">#</a> 7.快速添加当前路径到PATH（临时）</h2> <ul><li>公司使用</li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>whoway@XXXX:~/oldcode$ <span class="token builtin class-name">echo</span> <span class="token environment constant">$PATH</span>
/usr/local/games:/snap/bin
whoway@XXXX:~/oldcode$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token builtin class-name">pwd</span><span class="token variable">)</span></span><span class="token builtin class-name">:</span><span class="token environment constant">$PATH</span>
whoway@XXXX:~/oldcode$ <span class="token builtin class-name">echo</span> <span class="token environment constant">$PATH</span>
/home/whoway/oldcode:/usr/local/games:/snap/bin
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div></div> <div class="page-edit"><!----> <!----></div> <!----> </div> <!----></div></div>
    <script src="/assets/js/app.c70e21ad.js" defer></script><script src="/assets/js/150.406c4b20.js" defer></script>
  </body>
</html>
